<!--// header //--> 
{include="../public/header"}
    <!--主体内容-->
    <!--当前操作-->
    <div style="margin-left:65px; margin-right:65px; width:auto">
    <div class="row-fluid">
   	  <div class="span12">
        	<h2 style="margin:12px; color:#41516a">学生档案管理</h2>
      </div>
    </div>		
<style>
.the-legend {
    border-style: none;
    border-width: 0;
    font-size: 14px;
    line-height: 20px;
    margin-bottom: 0;
}
.the-fieldset {
    border: 2px groove threedface #444;
    -webkit-box-shadow:  0px 0px 0px 0px #000;
            box-shadow:  0px 0px 0px 0px #000;
}
</style>

    <!--搜索区域-->
<form class="form-search" method="post" action="/Student/index">
  <input type="text" class="input-medium search-query" name="searchfor">
  <button type="submit" class="btn">Search</button>
</form>
    <!--搜索区域-->
    <!--当前操作-->
    <div class="row-fluid">
    	<div class="span12">
        <div class="row-fluid">
        <!--tab-->
        <div class="tabbable">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#1" data-toggle="tab"><font color="orange">档案编辑</font></a></li>        
        	<li><a href="/Student/index">浏览档案</a></li>
        	<li><a href="/Student/index">学生建档</a></li>
        </ul>
            <div class="tab-content">
                <div class="tab-pane active" id="1">
          	<form name="frm" method="post" action="/Student/update" onsubmit="return validate();">      
		 <div class = 'form-horizontal well'>
		 	<fieldset class="well the-fieldset">
			<legend class="the-legend">基本信息</legend>
				<div class="row-fluid show-grid">
			      	<div class="span4">
					<label>姓名
		    			<input type="text" name="uName"id="uName"  value="{$student.uName}" /></label>
				</div>
			      	<div class="span4">
					<label>课程
		    			<select name="cId" id="cId">
					<option value='0'>--选择课程--</option>
					{loop="course"}
					<option value="{$value.id}" {if condition="$student.cId == $value.id"}selected{/if}>{$value.cName}</option>
					{/loop}
					</select>
					</label>
				</div>
			      	<div class="span4">
					<label>班级
		    			<select name="gId" id="gId">
					<option value='0'>--选择班级--</option>
					{loop="grade"}
					<option value="{$value.id}" {if condition="$student.gid == $value.id"}selected{/if}>{$value.gname}</option>
					{/loop}
					</select>
					</label>
				</div>
				<div class="row-fluid show-grid">
			      	<div class="span4">
					<label>学校
		    			<input type="text" name="uSchool" id="uSchool"  value="{$student.uSchool}" /></label>	
				</div>
			      	<div class="span4">
					<label>爸爸
		    			<input type="text" name="uFather" id="uFather"  value="{$student.uFather}" /></label>	
				</div>
			      	<div class="span4">
					<label>电话
		    			<input type="text" name="uFathertel" id="uFathertel"  value="{$student.uFathertel}" onkeyup="value=value.replace(/[^\d]/g,'')" /></label>	
				</div>
			    </div>     
				<div class="row-fluid show-grid">
			      	<div class="span4">
					<label>缴费
		    			<input type="text" name="uPayfee" id="uPayfee" value="{$student.uPayfee}" onkeyup="value=value.replace(/[^\d]/g,'')" /></label>	
				</div>
			      	<div class="span4">
					<label>妈妈
		    			<input type="text" name="uMother" id="uMother"  value="{$student.uMother}" /></label>	
				</div>
			      	<div class="span4">
					<label>电话
		    			<input type="text" name="uMothertel" id="uMothertel"  value="{$student.uMothertel}" onkeyup="value=value.replace(/[^\d]/g,'')" /></label>	
				</div>
			    </div>     
			<div class="row-fluid show-grid">
			<div class="span4">
				<label>状态
				<select name="status" id="status">
				<option value='0'>--选择状态--</option>
				<option value="0" {if condition="$student.status == 0"}selected{/if}>正常</option>
				<option value="1" {if condition="$student.status == 1"}selected{/if}>结业</option>
				<option value="2" {if condition="$student.status == 2"}selected{/if}>退费</option>
				<option value="3" {if condition="$student.status == 3"}selected{/if}>休学</option>
				</select>
				</label>
			</div>
			<div class="span4">
				<label>结业
				<input type="text" name="endtime" id="endtime" placeholder="选择结业时间" /></label>	
			</div>
			<div class="span4">
			</div>
			    </div>     
    			</fieldset>
		 	<fieldset class="well the-fieldset">
			<legend class="the-legend">详细信息</legend>
				<div class="row-fluid show-grid">
			      	<div class="span4">
					<label>生日
		    			<input type="text" name="uBirth" id="uBirth" value="{$student.uBirth}" placeholder="格式:xxxx-xx-xx" /></label>
				</div>
			      	<div class="span4">
					<label>性别
		    			<input type="radio" name="uSex" value="1" {if condition="$student.uSex == 1"}checked{/if} />男&nbsp;&nbsp;<input type="radio" name="uSex" value="2" {if condition="$student.uSex == 2"}checked{/if} />女</label>	
				</div>
			      	<div class="span4">
					<label>年龄
		    			<input type="text" name="uAge" id="uAge" value="{$student.uAge}" onkeyup="value=value.replace(/[^\d]/g,'')" /></label>	
				</div>
				<div class="row-fluid show-grid">
			      	<div class="span4">
					<label>籍贯
		    			<input type="text" name="uWhere" id="uWhere" value="{$student.uWhere}" /></label>
				</div>
			      	<div class="span4">
					<label>渠道
					<select name="uFrom" id="uFrom">
						<option value="1" {if condition="$student.uFrom == 1"}selected{/if}>报纸</option>
						<option value="2" {if condition="$student.uFrom == 2"}selected{/if}>网络搜索</option>
						<option value="3" {if condition="$student.uFrom == 3"}selected{/if}>户外广告</option>
						<option value="4" {if condition="$student.uFrom == 4"}selected{/if}>同学推荐</option>
						<option value="5" {if condition="$student.uFrom == 5"}selected{/if}>内部介绍</option>
					</select>
		    			</label>	
				</div>
			      	<div class="span4">
				</div>
			      	<div class="span">
				</div>
				<div class="row-fluid show-grid">
				<div class="span12">
					<label>备注<textarea name="uMemo">{$student.uMemo}</textarea></label>
				</div>			
				</div>
				<div class="span4">
				<input type="hidden" id="id "name="id" value="{$student.id}" />
				<button type="submit" class="btn">确认修改</button>
				</div>
			    </div>     
    			</fieldset>
			</div>
			</form>
                </div>
        	</div>
      	</div>
        <!--tab-->
        </div>
        </div>
   	  
    </div>
    </div>
	<!--主体内容-->
<script>
function validate(){
	var uName = $("#uName").val();	
	var uParents = $("#uParents").val();	
	var uParentstel = $("#uParentstel").val();	
	//手机 数字 11位 验证 及其他几项 必须是数字的验证
	var cId = $("#cId").val();	
	var uTotalfee = $("#uTotalfee").val();	
	var uSchool = $("#uSchool").val();	
	var uFrom = $("#uFrom").val();	
	var uSex = $("#uSex").val();	
	var uAge = $("#uAge").val();	
	var uBirth = $("#uBirth").val();	
	if(uName == '' || uParents == '' || uParentstel == '' || cId =='' || uTotalfee == '' || uFrom == '' || uSchool == '' || uFrom == '' || uSex == '' || uAge == '' || uBirth == ''){
		alert('学生信息不完整，请检查重新填！');
		return false;
	}
}
</script>
<!--// footer //--> 
{include="../public/footer"}
